Crate javascriptcore_sys
source ·Expand description
This crate provides raw bindings for the JavaScriptCore public API. It is a pretty direct mapping of the underlying C API provided by JavaScriptCore.
Structs
- Contains properties and callbacks that define a type of object.
- A statically declared function property.
- A statically declared value property.
Enums
- A constant identifying the type of a
JSValue
. - A constant identifying the Typed Array type of a
JSObjectRef
.
Functions
- Checks for syntax errors in a string of JavaScript.
- Creates a JavaScript class suitable for use with
JSObjectMake
. - Releases a JavaScript class.
- Retains a JavaScript class.
- Gets the global context of a JavaScript execution context.
- Gets the global object of a JavaScript execution context.
- Gets the context group to which a JavaScript execution context belongs.
- Creates a JavaScript context group.
- Releases a JavaScript context group.
- Retains a JavaScript context group.
- Evaluates a string of JavaScript.
- Performs a JavaScript garbage collection.
- Gets a copy of the name of a context.
- Creates a global JavaScript execution context.
- Creates a global JavaScript execution context in the context group provided.
- Releases a global JavaScript execution context.
- Retains a global JavaScript execution context.
- Sets the remote debugging name for a context.
- Calls an object as a constructor.
- Calls an object as a function.
- Gets the names of an object’s enumerable properties.
- Deletes a property from an object.
- Returns the number of bytes in a JavaScript data object.
- Returns a pointer to the data buffer that serves as the backing store for a JavaScript Typed Array object.
- Gets an object’s private data.
- Gets a property from an object.
- Gets a property from an object by numeric index.
- Gets an object’s prototype.
- Returns the JavaScript Array Buffer object that is used as the backing of a JavaScript Typed Array object.
- Returns the byte length of a JavaScript Typed Array object.
- Returns the byte offset of a JavaScript Typed Array object.
- Returns a temporary pointer to the backing store of a JavaScript Typed Array object.
- Returns the length of a JavaScript Typed Array object.
- Tests whether an object has a given property.
- Tests whether an object can be called as a constructor.
- Tests whether an object can be called as a function.
- Creates a JavaScript object.
- Creates a JavaScript Array object.
- Creates a JavaScript Array Buffer object from an existing pointer.
- Convenience method for creating a JavaScript constructor.
- Creates a JavaScript
Date
object, as if by invoking the built-inDate
constructor. - Creates a JavaScript
Error
object, as if by invoking the built-inError
constructor. - Creates a function with a given script as its body.
- Convenience method for creating a JavaScript function with a given callback as its implementation.
- Creates a JavaScript
RegExp
object, as if by invoking the built-inRegExp
constructor. - Creates a JavaScript Typed Array object with the given number of elements.
- Creates a JavaScript Typed Array object from an existing JavaScript Array Buffer object.
- Creates a JavaScript Typed Array object from an existing JavaScript Array Buffer object with the given offset and length.
- Creates a JavaScript Typed Array object from an existing pointer.
- Sets a pointer to private data on an object.
- Sets a property on an object.
- Sets a property on an object by numeric index.
- Sets an object’s prototype.
- Adds a property name to a JavaScript property name accumulator.
- Gets a count of the number of items in a JavaScript property name array.
- Gets a property name at a given index in a JavaScript property name array.
- Releases a JavaScript property name array.
- Retains a JavaScript property name array.
- Creates a JavaScript string from a buffer of Unicode characters.
- Creates a JavaScript string from a null-terminated UTF8 string.
- Returns a pointer to the Unicode character buffer that serves as the backing store for a JavaScript string.
- Returns the number of Unicode characters in a JavaScript string.
- Returns the maximum number of bytes a JavaScript string will take up if converted into a null-terminated UTF8 string.
- Converts a JavaScript string into a null-terminated UTF8 string, and copies the result into an external byte buffer.
- Tests whether two JavaScript strings match.
- Tests whether a JavaScript string matches a null-terminated UTF8 string.
- Releases a JavaScript string.
- Retains a JavaScript string.
- Creates a JavaScript string containing the JSON serialized representation of a JS value.
- Returns a JavaScript value’s type.
- Returns a JavaScript value’s Typed Array type.
- Tests whether a JavaScript value is an
array
. - Tests whether a JavaScript value’s type is the
boolean
type. - Tests whether a JavaScript value is a
date
. - Tests whether two JavaScript values are equal, as compared by the JS
==
operator. - Tests whether a JavaScript value is an object constructed by a given constructor, as compared by the JS
instanceof
operator. - Tests whether a JavaScript value’s type is the
null
type. - Tests whether a JavaScript value’s type is the
number
type. - Tests whether a JavaScript value’s type is the
object
type. - Tests whether a JavaScript value is an
object
with a given class in its class chain. - Tests whether two JavaScript values are strict equal, as compared by the JS
===
operator. - Tests whether a JavaScript value’s type is the
string
type. - Tests whether a JavaScript value’s type is the
undefined
type. - Creates a JavaScript value of the
boolean
type. - Creates a JavaScript value from a JSON formatted string.
- Creates a JavaScript value of the
null
type. - Creates a JavaScript value of the
number
type. - Creates a JavaScript value of the string type.
- Creates a JavaScript value of the
undefined
type. - Protects a JavaScript value from garbage collection.
- Converts a JavaScript value to boolean and returns the resulting boolean.
- Converts a JavaScript value to number and returns the resulting number.
- Converts a JavaScript value to object and returns the resulting object.
- Converts a JavaScript value to string and copies the result into a JavaScript string.
- Unprotects a JavaScript value from garbage collection.
Type Definitions
- A UTF-16 code unit.
- A set of
JSClassAttribute
s. - A JavaScript class. Used with
JSObjectMake
to construct objects with custom behavior. - A group that associates JavaScript contexts with one another. Contexts in the same group may share and exchange JavaScript objects.
- A JavaScript execution context. Holds the global object and other execution state.
- A global JavaScript execution context. A
JSGlobalContext
is aJSContext
. - The callback invoked when an object is used as a constructor in a
new
expression. - The callback invoked when an object is called as a function.
- The callback invoked when converting an object to a particular JavaScript type.
- The callback invoked when deleting a property.
- The callback invoked when an object is finalized (prepared for garbage collection). An object may be finalized on any thread.
- The callback invoked when getting a property’s value.
- The callback invoked when collecting the names of an object’s properties.
- The callback invoked when an object is used as the target of an
instanceof
expression. - The callback invoked when determining whether an object has a property.
- The callback invoked when an object is first created.
- A JavaScript object. A
JSObjectRef
is aJSValueRef
. - The callback invoked when setting a property’s value.
- A set of
JSPropertyAttribute
s. - An ordered set used to collect the names of a JavaScript object’s properties.
- An array of JavaScript property names.
- A UTF16 character buffer. The fundamental string representation in JavaScript.
- A function used to deallocate bytes passed to a Typed Array constructor. The function should take two arguments. The first is a pointer to the bytes that were originally passed to the Typed Array constructor. The second is a pointer to additional information desired at the time the bytes are to be freed.
- A JavaScript value. The base type for all JavaScript values, and polymorphic functions on them.